package com.kaizeli.website.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kaizeli.website.pojo.entity.AcceptanceMember;
import com.kaizeli.website.pojo.dto.AcceptanceMemberDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 验收成员Mapper接口
 */
@Mapper
public interface AcceptanceMemberMapper extends BaseMapper<AcceptanceMember> {

    /**
     * 根据验收单ID查询验收成员列表
     */
    List<AcceptanceMemberDTO> selectByAcceptanceId(@Param("acceptanceId") Long acceptanceId);

    /**
     * 根据员工ID查询验收记录
     */
    List<AcceptanceMemberDTO> selectByEmployeeId(@Param("employeeId") Long employeeId);

    /**
     * 更新验收成员状态
     */
    int updateStatus(@Param("id") Long id, @Param("status") String status);

    /**
     * 批量插入验收成员
     */
    int batchInsert(@Param("members") List<AcceptanceMember> members);
}